//package com.chixing.config;
//
//import org.jetbrains.annotations.NotNull;
//import org.springframework.web.servlet.HandlerInterceptor;
//import org.springframework.web.servlet.ModelAndView;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
//public class MyInterceptor implements HandlerInterceptor {
//    public MyInterceptor(){
//        System.out.println("MyInterceptor contructor...........");
//    }
//
//    //在执行目标方法之前
//    @Override
//    public boolean preHandle( HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
//        System.out.println(request);
//        System.out.println("MyInterceptor preHandle");
//        return true;
//    }
//
//    //在执行目标方法之后，在目标方法return 返回响应视图之前
//    @Override
//    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
//        System.out.println("MyInterceptor postHandle");
//    }
//
//    //在目标方法return 返回响应视图之后
//    @Override
//    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
//        System.out.println("MyInterceptor afterCompletion");
//    }
//}
